﻿using PLCS.Application.Contracts.EquipmentApp.Dtos;
using PLCS.Application.Contracts.StationApp.Dtos;

namespace PLCS.Application.Contracts.StationApp
{
    public interface IStationAppService : ICrudAppService<StationDto, Guid, PagedResultRequestDto, StationEditDto>
    {
        /// <summary>
        /// 根据工位名称查询工位
        /// </summary>
        /// <param name="name">工位名称</param>
        /// <returns>工位实体</returns>
        Task<StationDto> GetBySNameAsync(string name);

        /// <summary>
        /// 批量插入工位
        /// </summary>
        /// <param name="stations"></param>
        /// <returns></returns>
        Task InsertListAsync(IEnumerable<StationEditDto> stations);

        Task<IEnumerable<StationDto>> GetBySNameFuzzyAsync(string name);

        Task DeleteAllAsync();

        Task UpdateAsync(StationEditDto input);

        Task<PagedResultDto<StationDto>> GetListBySearchAsync(PagedResultRequestDto input, string? stationNo, string? stationType);
    }
}